package com.dwxt.cdms.entity.laibang;

import com.alibaba.fastjson.JSON;
import com.dwxt.cdms.entity.LbWatch;
import org.springframework.beans.BeanUtils;

public class LbWatchConvertor {
    public static LbWatch VO2Entity(LbWatchVO vo) {
        LbWatch entity = new LbWatch();
        BeanUtils.copyProperties(vo, entity);
        entity.setAddAmbientBeaconDTO(JSON.toJSONString(vo.getAddAmbientBeaconDTO()));
        entity.setAddBodyTemperatureDTO(JSON.toJSONString(vo.getAddBodyTemperatureDTO()));
        entity.setAddDevicePowerDTOList(JSON.toJSONString(vo.getAddDevicePowerDTOList()));
        entity.setAddHealthDTO(JSON.toJSONString(vo.getAddHealthDTO()));
        entity.setAddHumitureDTO(JSON.toJSONString(vo.getAddHumitureDTO()));
        entity.setAddPositionStatusDTOList(JSON.toJSONString(vo.getAddPositionStatusDTOList()));
        entity.setAddSignalQualityDTO(JSON.toJSONString(vo.getAddSignalQualityDTO()));
        entity.setAddWearStatusDTO(JSON.toJSONString(vo.getAddWearStatusDTO()));
        entity.setAddWifiDTO(JSON.toJSONString(vo.getAddWifiDTO()));
        return entity;
    }
}
